package com.feicheng.service;

import com.alibaba.fastjson.JSONArray;
import com.feicheng.common.result.ResultInfo;
import com.feicheng.persistence.entity.Category;
import com.feicheng.persistence.entity.CategoryDetail;
import com.feicheng.persistence.entity.Image;
import com.feicheng.persistence.entity.Product;

import java.util.List;

public interface IFProductService {

    void initCategoryCache();

    List<Category> getSubCategory(Integer categoryId);

    List<? extends Category> allCategoryForData();

    ResultInfo getCategory(Integer categoryId);

    JSONArray allCurrentCategoryIds(Integer categoryId, JSONArray result);
    
    ResultInfo getCategoryDetail(Integer categoryId);
    
    ResultInfo getCagetorysByPage(Category category, Integer current, Integer size);

	ResultInfo newCategoryInfo(Category category, String url, String contant);

	ResultInfo deleteCategoryInfo(Integer categoryId);

	ResultInfo getProductDetail(Integer productId);

	ResultInfo deleteProductInfo(Integer productId);
	
	ResultInfo getProductsByPage(Product product,Integer current,Integer size,Integer endPrice);
	
	ResultInfo updateProduct(Product product, String url, Boolean imgStatu, Boolean imgDflg, JSONArray jsonArrayUrl);//更改产品详情
	
	ResultInfo getLevelNum();
	
	ResultInfo updateCategoryInfo(Category category, String url, String contant);

	ResultInfo addProductInfo(Product product, String url, JSONArray urls);

	ResultInfo getPList(Integer level);

	ResultInfo getPName(Integer categoryId);
	
	ResultInfo getProductsBycategoryId(Integer categoryId);
}
